-- GENERATED SPELL FOR [Wild Worg] --


function spell0_24128(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(27050,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24128', 621, 1)
end

function spell1_24128(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24128', 0, 1)
end

function spell2_24128(pUnit, Event) --@Powerful Bite,n/a--
pUnit:FullCastSpellOnTarget(48287,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24128', 5284, 1)
end

function Sorts_24128(pUnit, Event)
local choix_sorts_24128 = math.random(0, 2)
if choix_sorts_24128 == 0 then
pUnit:RegisterEvent('spell0_24128', 1, 1)
end
if choix_sorts_24128 == 1 then
pUnit:RegisterEvent('spell1_24128', 1, 1)
end
if choix_sorts_24128 == 2 then
pUnit:RegisterEvent('spell2_24128', 1, 1)
end
end

function mob24128_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24128', math.random(1500, 3000), 1)
end

function mob24128_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24128_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24128_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24128, 1, 'mob24128_Action')
RegisterUnitEvent(24128, 2, 'mob24128_Leave')
RegisterUnitEvent(24128, 3, 'mob24128_Kill')
RegisterUnitEvent(24128, 4, 'mob24128_Die')
